package com.boss.oss.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

/**
 * 读取配置文件
 * @author Hu_liantian
 * @date 2020/07/24
 */
public class ReadProperty {
    public static Map readProperty() throws IOException {

        Properties properties = new Properties();
        properties.load(new FileInputStream(url));

        Map map = new HashMap();
        map.put("endpoint", properties.get("endpoint"));
        map.put("accessKeyId", properties.get("accessKeyId"));
        map.put("accessKeySecret", properties.get("accessKeySecret"));

        return map;
    }

}
